<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	
	<title>{$pageTitle}</title>
	
	<!-- head -->
	{include file="head.tpl"}

</head>

<body>

<!-- body_js -->
{include file="body_js.tpl"}

	<div id="wrap">
		
		<!-- header -->
		{include file="header.tpl"}
		
		<div id="body">
			
			<div id="body_left">
			
				<!-- breadcrumbs -->
				{include file="breadcrumbs.tpl"}
			
				<h1> Edit category </h1>
					
				{if $error_msg ne ""}
					<div class="error" id="notice">
						{$error_msg}
					</div>
				{/if}
				
				{if $form_sent eq "yes" and $error_msg eq ""}
					<div class="notice" id="notice">
						<p> The category has been updated! </p>
					</div>
					<p>
						<input type="button" value="Continue" onclick="javascript:window.location='{$smarty.const.BASE_URL}admin.php'" />
					</p>
				{else}
					<form action="{$smarty.const.BASE_URL}admin-edit-category.php?id={$categoryId}" method="post">
					
					<p class="form_item">
					<span class="label">NAME</span>
					<span class="desc">Enter category name.</span>
					<input name="form_sent" type="hidden" value="yes" />
					<input type="text" name="name" id="name" value="{$name}" />
					</p>

					<p class="form_item">
					<input type="submit" value="Update category" /> 
					<input type="button" value="Cancel" onclick="javascript:window.location='{$smarty.const.BASE_URL}admin.php';" />
					</p>
					
					</form>
				{/if}
			</div>
			<div id="body_right">
			  <!-- body_right -->
				{include file="body_right.tpl"}
			</div>
			<div class="clearer"></div>
		</div>
	</div>
	<!-- footer -->
	{include file="footer.tpl"}
</body>
</html>
